package m202406.d05;

import java.util.*;

/**
 * @@author: 爱做梦的锤子
 * @date: 2024/6/5 14:54
 */
//(C卷,200分)- 启动多任务排序
public class C200_04 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String[] relation = scanner.nextLine().split(" ");
        Map<String, Set<String>> dependencyMap = new HashMap<>();
        for (String s : relation) {
            String[] split = s.split("->");
            Set<String> deSet = dependencyMap.getOrDefault(split[0], new HashSet<>());
            deSet.add(split[1]);
            dependencyMap.put(split[0], deSet);
        }
    }

    private static void handle(Map<String, Set<String>> beDe, Map<String, Set<String>> de, List<String> list) {
        for (Map.Entry<String, Set<String>> entry : beDe.entrySet()) {
            if (!de.containsKey(entry.getKey())) {
                list.add(entry.getKey());
            }
        }


    }
}
